home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-10-14 | 8.7 KB | 212 lines | [ttro/ttxt] |
- Script Development FAQ
-
- Answers to the following Installer scripting questions, fresh from our resident Installer curmudgeon's email files:
-
- • If I make changes to the files I'm installing, do I need to change my Installer script?
- • How do make a debug version of my Installer script? (How do I make a Debug Log?)
- • How do I check for the existence of a particular file before installation?
- • I want to add a splash screen to my script. What are the dimensions for the splash screen?
- • Should I install my application as FAT, rather than PPC or 68K (depending on machine type) on Easy Install?
- • What do I have to watch out for if I'm using InstaCompOne compressed files?
- • What's the scoop on InstaCompOne font compression?
- • Can I put more than one font into an InstaCompOne archive?
-
-
-
- Q: If I make changes to the files I'm installing, do I need to change my Installer script?
-
- A: The installer script needs to change if a file gets added or deleted,
- changes name, type/creator, source location on the disk set, or target
- location to get installed.
-
- Usually, the installer script does not have to be changed if a file
- changes size, version number, or contents. (You may need to rerun
- the ScriptCheck tool in this instance.)
-
- The script also needs to change if a file grows a whole lot and the disks
- need to be reorganized.
-
-
- Q: How do make a debug version of my Installer script?
-
- A: You need the following pieces:
- - your install disk set or net install
- - The "Installer_Debug" application program
- - The "Installer Debugger.rsrc" resource file.
- - ResEdit or Resourcerer
-
- Step 1: Make a copy of the install script, next to the original. Call it
- "<whatever> debug". Put the "Installer_Debug" application next to the
- regular installer.
-
- Step 2: Use ResEdit or Resourcerer to open this copy and the "Installer
- Debugger.rsrc" file.
-
- Step 3: Copy all the resources from the "Installer Debugger.rsrc" file to
- the "<whatever> debug" install script file.
-
- Step 4: Save, close, quit.
-
- Step 5: THE FIRST TIME YOU RUN THE DEBUG INSTALLER on a particular
- System, you'll need to set up the preferences. Here's how:
- a) Drag your "<whatever> debug" install script onto the
- "Installer_Debugger" app.
- b) Click "Continue" in the splash screen window.
- c) Click in the "Wasabi Debugger" window to bring it to the front.
- d) Select "Preferences" from the "Wasabi" menu.
- e) Click on ALL the checkboxes EXCEPT "Break On Quit", "Open Rule
- Window", and "Open Heap Window".
- f) Select "Quit" from the "Wasabi" menu.
-
- NOW YOU'RE READY TO MAKE A DEBUG LOG:
-
- Step 6: Drag your "<whatever> debug" install script onto the
- "Installer_Debugger" app.
-
- Step 7: Click "GO" in the "Wasabi Debugger" window. (This will take a
- moment.)
-
- Step 8: If the disk you want to install onto is not already selected in
- the installer main window, select it now. (This will take a moment.)
-
- Step 9: Select Easy or Custom install as needed.
-
- Step 10: Select Custom Options, if needed.
-
- Step 11: Click "Install."
-
- Step 12: Proceed with the install as normal. If all goes well, the debug
- installer will exhibit the same behavior as the non-debug one.
-
- Step 13: After the install finishes (or fails), dismiss any dialogs and
- click "Quit" in the installer main window.
-
- Step 14: Next to the installer script will be a file, "Wasabi Debugger
- Log File". This is the Log File you want.
-
-
- Q: Before installation, I need to check for the existence of a particular file,
- and stop the installation if it is found. How do I do this?
-
- A: If the file's name is not localized, you can do this with
- CheckFileRsrcForkExists and a regular intf.
-
- If the name changes in different countries, you can do this with
- CheckFileRsrcForkExists and an intf which includes a search procedure
- that searches by type and creator and NOT name.
-
- If you do find it, you need to put up an error that explains the problem
- so the user can understand what to do: ReportVolError("Installation
- cannot continue because it appears that <the offending file> is installed on
- the disk "^0"\nPlease remove <the offending file> before installing this
- software.")
-
- Note that ReportVolError does not work correctly in the Global rules
- framework, only the Easy framework and the Custom framework. So check
- for it in the Global framework, assert its existence, then check the assertion
- in Easy or Custom or both.
-
-
- Q: I want to add a splash screen to my script. What are the dimensions for the splash screen?
-
- A: This information is in the Installer Technical Guide, under the section
- "Adding a Splash Screen."
-
- You need to make two PICT resources, max size 433x220 pixels. One must be
- black-and-white. The other should be 8 bit per pixel "system palette"
- color.
-
- It's suggested to use Garamond 18pt and 14pt, but whatever is on your
- packaging is probably optimal. NOTE that all fonts must be converted to
- bitmap. Otherwise your Ziggacious Bold font will be conveniently turned
- into Geneva Jaggie.
-
-
- Q: Should I install my application as FAT, rather than PPC or 68K (depending on machine type) on Easy Install?
-
- A: The usual way this is handled:
-
- Easy install installs fat apps all the time.
-
- Custom install has an option that says Fat Install with sub-options for
- PPC-only and 68K-only installs. (This custom install is complex and takes
- quite a bit of extra installer script work. See the "Install App Fat/PPC/68K"
- script example.)
-
- This way is documented in the Installer 4.0.3 SDK as being the standard.
-
- Rationale:
-
- Asking the user during an Easy install is an HI no-no. A script deciding
- without user intervention is very likely to do the wrong thing.
-
- Now there are some machines we KNOW cannot be 68K, and some we know
- cannot be PPC, but if you install onto an external drive, you might take
- the drive to another machine. Or the "drive" might be a powerbook in SCSI
- disk mode. Or you might have a machine you can't tell about: a Q950 might
- have a PPC upgrade card in it.
-
- Suggestion:
-
- I would suggest following the usual way, except for one potential
- problem: if the custom install options vary across system versions,
- tri-mode installation (68k, ppc, fat) could make the number of
- installation packages gigantic. This impacts scriptwriter, testers, and
- perhaps users (could slow down custom install window refresh).
-
-
- Q: What do I have to watch out for if I'm using InstaCompOne compressed files?
-
- A: If you are using compressed files, and you use "useScrCrDateToCompare"
- in your infa's, the Installer will use the creation date of the
- compressed file -- not the original file -- as its comparison date.
- Therefore, if you are using compressed files, you will always want to
- compare by version number, by using "useVersProcToCompare" instead. The
- default version procedure (indicated by putting 0 in the compare function
- field) should be sufficient for all but cases except system enablers.
-
-
- Q: What's the scoop on InstaCompOne font compression?
-
- A: Fonts are compressed in a different way than regular files.
-
- Regular files are compressed as entire files into a FILE archive (tome).
- The files are all jammed into the data fork of the archive. During
- installation, the files are decompressed and installed as entire files.
-
- Fonts are compressed by making a RESOURCE archive. Individual font
- resources of type sfnt are compressed into the resource fork of the tome.
- During the compression, their type is changed to part and their id is
- reassigned based on a wacky algorithm. A tool called FONDinfoWS does this
- translation. It generates the command lines to InstaCompOne that compress
- the sfnts.
-
- Now, FOND resources are not compressed, just copied into the resource
- fork of the tome, however, they are changed from type FOND to type iFND.
-
- During installation, the installer does about 999 magic tricks to install
- the fonts from the individual resources into the correct font suitcases,
- but that's an entirely other story.
-
-
- Q: Can I put more than one font into an InstaCompOne archive?
-
- A: It is not recommeded to put more than one font into an InstaCompOne
- archive. There is a possibility that their IDs may overlap and create havoc.
-
- 1) Due to the way that the Installer compresses fonts, FONDs with the
- same ID# cannot be put in the same archive. (Also, in the past, all
- FONDs were required to have unique IDs. Not any more.) The Finder
- renumbers FONDs as needed.
-
- 2) This issue is different than sfnt ID#'s. No one even pretends to
- require sfnt's to have unique IDs. So the installer font compressor
- assistant (FONDinfoWS, which teams up with InstaCompOne to compress
- fonts) assigns a supposedly-unique "part number" for each sfnt.
- Ufortunately, that "unique" ID is not very unique.
-
- Neither of these two problems affects how fonts look.
-
- The only way that there's a problem is that if some parts or FONDs have
- the same ID, the same font strike will show up for two different fonts.
-